]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Add work-around for testing greeter UI in nested
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 2 Dec 2022 19:52:44 +0000 (20:52 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 9 Feb 2023 18:59:12 +0000 (19:59 +0100)
Testing the greeter UI in nested has been broken for a long time
now, because the backend isn't ready yet when we try to push a
modal (via the screen shield).

As running nested is only relevant for development and testing,
working around the issue rather than fixing it properly seems
fine, so do just that and slightly delay startup when testing
the greeter UI.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2573>

js/ui/layout.js

index ed09c8f83bcb4920f472f48ebba9dc62ec143ad5..d7f73dcaca24dd1158326df7741cb891f527dbaa 100644 (file)
@@ -745,7 +745,11 @@ var LayoutManager = GObject.registerClass({
             await this._updateBackgrounds();
         }
 
-        this.emit('startup-prepared');
+        // Hack: Work around grab issue when testing greeter UI in nested
+        if (GLib.getenv('GDM_GREETER_TEST') === '1')
+            setTimeout(() => this.emit('startup-prepared'), 200);
+        else
+            this.emit('startup-prepared');
 
         this._startupAnimation();
     }